//
//  CollectionWebViewModel.m
//  A_project2.0
//
//  Created by Tiny on 16/3/16.
//  Copyright © 2016年 七平. All rights reserved.
//

#import "CollectionWebViewModel.h"

@implementation CollectionWebViewModel
#pragma mark -  归档方法
- (void) encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:_title forKey:@"标题"];
    [aCoder encodeObject:_urlStr forKey:@"网址"];
}
#pragma mark -  解档方法
- (instancetype) initWithCoder:(NSCoder *)coder
{
    self = [super init];
    if (self) {
        // 按照归档时的key取值
        self.title = [coder decodeObjectForKey:@"标题"];
        self.urlStr = [coder decodeObjectForKey:@"网址"];
    }
    return self;
}
@end
